package com.jumi.microservice.dto.reponse;

import com.jumi.microservice.enums.CheckStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

@ApiModel("用户注销申请日志返回结果")
public class JmLogOutResponse extends BaseUserReponse {

    @ApiModelProperty("记录id")
    private Integer id;

    @ApiModelProperty(value = "用户id")
    private Integer uid;

    @ApiModelProperty(value = "注销理由")
    private String applyReason;

    @ApiModelProperty(value = "状态：0待审核，1审核通过，2审核不通过")
    private CheckStatus status;

    @ApiModelProperty(value = "申请时间")

    private LocalDateTime createTime;

    @ApiModelProperty(value = "审核人")
    private Long adminId;

    @ApiModelProperty(value = "不通过原因")
    private String adminReason;

    @ApiModelProperty(value = "审核时间")

    private LocalDateTime examineTime;

    @ApiModelProperty(value = "审核人姓名")
    private String adminName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getApplyReason() {
        return applyReason;
    }

    public void setApplyReason(String applyReason) {
        this.applyReason = applyReason;
    }

    public CheckStatus getStatus() {
        return status;
    }

    public void setStatus(CheckStatus status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public String getAdminReason() {
        return adminReason;
    }

    public void setAdminReason(String adminReason) {
        this.adminReason = adminReason;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        if (this.status.equals(CheckStatus.待审核))
            this.adminName = "";
        else
            this.adminName = adminName;
    }

    public LocalDateTime getExamineTime() {
        return examineTime;
    }

    public void setExamineTime(LocalDateTime examineTime) {
        if (this.status.equals(CheckStatus.待审核))
            this.examineTime = null;
        else
            this.examineTime = examineTime;
    }
}
